<template>
	<view>
		获取位置信息
		
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				x1: '',
				y1: '',
				
				x2: '',
				y2: ''
			}
		},
		methods: {

		},

		onLoad() {
			uni.getLocation({
				type: 'wgs84',
				success: (res) => {
					
					this.x1 = res.longitude
					this.y1 = res.latitude
					console.log('当前位置的经度：' + res.longitude);
					console.log('当前位置的纬度：' + res.latitude);

				},
			})
			
			
			
			uni.getLocation({
				type: 'wgs84',
				success: (res) => {
					
					this.x1 = res.longitude
					this.y1 = res.latitude
					console.log('当前位置的经度：' + res.longitude);
					console.log('当前位置的纬度：' + res.latitude);
			
				},
			})
			
			
			
		}
	}
</script>

<style>

</style>
